/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package sUtils;

public class Lang {
    
    static public int id = 0; // 0=english, 1=deutsch,
    
    public Lang()
    {
        init();
    }

    public static void init()
    {
        String s = System.getProperty("microedition.locale");
        if (s.startsWith("de")) id = 1;
    }

    public static void initX( String x )
    {
        String s = System.getProperty("microedition.locale");
        if (s.startsWith("de")) id = 1; else
        if (s.startsWith(x)) id = 2;
    }

    // directly return locale string
    public static String word( String en, String de )
    {
        return (id==1 && de!=null) ? de : en;
    }

    public static String wordX( String en, String de, String x )
    {
        return (id==2 && x!=null) ? x : ((id==1 && de!=null) ? de : en);
    }

}
